home *** CD-ROM | disk | FTP | other *** search
- /*
- File: NameRegistry.h
-
- Contains: NameRegistry Interfaces
-
- Version: Technology: System 8
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __NAMEREGISTRY__
- #define __NAMEREGISTRY__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=power
- /* the following contents can only be used by compilers that support PowerPC struct alignment */
-
- #if FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE
- /*
- These definitions apply to both the System7 and System8 interfaces
- RegEntryRef: The Global Entry Reference
- */
- struct RegEntryRef {
- UInt32 contents[4];
- };
- typedef struct RegEntryRef RegEntryRef;
-
-
- enum {
- kRegPathNameSeparator = ':' /* 0x3A */
- };
-
-
- enum {
- kRegMaxPropertyNameLength = 31 /* Max length of Property Name (terminator not included) */
- };
-
- typedef char RegPropertyNameBuf[32];
- #endif
- #if FOR_SYSTEM8_PREEMPTIVE
- /*
- ------------------------------------------------------------------------------------
- Name Registry Interface for System 8
- ------------------------------------------------------------------------------------
- */
- /*
- ------------------------------------------------------------------------------------
- Foundation Types
- ------------------------------------------------------------------------------------
- */
- /* Entry Name Definitions (Entry Names are C-Strings)*/
-
- enum {
- kRegMaxEntryNameLength = 47 /* Max length of a C-String Entry Name (terminator not included) */
- };
-
- /* length of RegEntryNameBuf = kRegMaxEntryNameLength +1*/
- typedef char RegEntryNameBuf[48];
- /* Create Entry Options*/
- typedef OptionBits RegCreateEntryOptions;
- /* use "kNilOptions" for no options*/
-
- enum {
- kRegCreateResidentEntry = 0x00000001 /* make entry resident */
- };
-
- /* Delete Entry Options*/
- typedef OptionBits RegDeleteEntryOptions;
- /* use "kNilOptions" for no options*/
-
- enum {
- kRegDeleteEmbeddedEntries = 0x00000001 /* delete embedded entries */
- };
-
- /* Entry Iterator*/
- typedef struct OpaqueRegEntryIterator* RegEntryIterator;
- /* Entry Iterator Options*/
- typedef OptionBits RegEntryIteratorOptions;
- /* use "kNilOptions" for no options*/
-
- enum {
- kRegIterateEmbeddedEntries = 0x00000002 /* iterate embedded entries */
- };
-
- /*
- Property Instances
- An instance value for a property is assigned by the Name Registry when the
- instance is created. This value is used to distinguish this instance from any
- other instances of the property. Instance values are unique and persistent for
- the life of the property. Thus, clients can obtain a reference to a property (name
- and instance value) and use that reference until the property is deleted or the
- system is restarted. At restart, new instance values are assigned to all
- properties, including any restored persistent properties.
- */
- typedef UInt32 RegPropertyInstance;
-
- enum {
- kRegNilPropertyInstance = 0x00000000, /* nil property instance */
- kRegAnyPropertyInstance = 0xFFFFFFFF, /* any property instance */
- kRegAllPropertyInstances = 0xFFFFFFFE /* all property instances */
- };
-
- /* Create Property Options*/
- typedef OptionBits RegCreatePropertyOptions;
- /* use "kNilOptions" for no options*/
-
- enum {
- kRegMultiInstanceProperty = 0x00000001 /* multiple-instance property */
- };
-
- /* Property Iterator*/
- typedef struct OpaqueRegPropertyIterator* RegPropertyIterator;
- /* Transaction Reference*/
- typedef struct OpaqueRegTransaction* RegTransaction;
- /* Nil Transaction Reference*/
- #define kRegNilTransaction (RegTransaction)0
- /*
- ------------------------------------------------------------------------------------
- Name Registry Calls
- ------------------------------------------------------------------------------------
- */
- /*
- ------------------------------------------------------------------------------------
- EntryRef Handling
- ------------------------------------------------------------------------------------
- */
- /* Compare two EntryRef's for equality. */
- extern Boolean RegEntryRefIsEqual(const RegEntryRef *ref1, const RegEntryRef *ref2);
-
- /*
- ------------------------------------------------------------------------------------
- Adding and Deleting Entries
- ------------------------------------------------------------------------------------
- */
- /*
- Create an Entry
- If (parentEntry) is NULL, the path name is assumed to be an absolute path name
- rooted to the anonymous, unnamed root.
- Note, RegCreateEntry only creates a single entry, the one at the end of the path.
- Thus, all parent entries along the path to the new entry (ancestors) must already
- exist.
- */
- extern OSStatus RegCreateEntry(RegTransaction transaction, const RegEntryRef *parentEntry, const char *pathName, RegCreateEntryOptions options, RegEntryRef *newEntry);
-
- /*
- Delete an Entry or Subtree
- RegDeleteEntry can be used to delete a single entry or a complete subtree.
- To delete a subtree, set the RegDeleteEmbedded option.
- All properties for deleted entries are also deleted.
- */
- extern OSStatus RegDeleteEntry(RegTransaction transaction, const RegEntryRef *ref, RegDeleteEntryOptions options);
-
- /*
- ------------------------------------------------------------------------------------
- LookUp Entry by Name
- ------------------------------------------------------------------------------------
- */
- /*
- Lookup Entry
- Locates an entry given a specified subroot (searchPointRef) and path name. If the
- searchPointRef pointer is NULL, the path name is assumed to be an absolute path
- name rooted to the root of the Registry.
- */
- extern OSStatus RegLookupEntry(RegTransaction transaction, const RegEntryRef *searchPointRef, const char *pathName, RegEntryRef *foundEntry);
-
- /*
- ------------------------------------------------------------------------------------
- Get Entry Name and Parent
- ------------------------------------------------------------------------------------
- */
- /*
- Retrieve the name component for the specified entry, and return the EntryRef for
- the parent entry.
- */
- extern OSStatus RegGetEntryName(RegTransaction transaction, const RegEntryRef *entryRef, RegEntryRef *parentEntry, char *nameComponent);
-
- /*
- ------------------------------------------------------------------------------------
- Get Path Name
- ------------------------------------------------------------------------------------
- */
- /*
- These are utility routines to turn an Entry ID back into a name string.
- Get Entry Path Size
- Note, path size is returned in bytes for C-String paths
- */
- extern OSStatus RegGetEntryPathSize(RegTransaction transaction, const RegEntryRef *entryRef, ByteCount *pathSize);
-
- /* Get Path Name*/
- extern OSStatus RegGetEntryPath(RegTransaction transaction, const RegEntryRef *entryRef, char *pathName, ByteCount pathSize);
-
- /*
- ------------------------------------------------------------------------------------
- Entry Iteration
- ------------------------------------------------------------------------------------
- */
- /*
- An Entry Iterator maintains three variables that are of interest to clients.
- First is an "OutermostScope" which defines the outer boundry of the iteration.
- This is defined by the starting entry and includes that entry plus all of it's
- embedded entries. Second is a "currentScope" which is the entry the iterator is
- currently in. And third is a "currentPosition" which is the last entry returned
- during an iteration.
- Create Entry Iterator
- Create the iterator structure. The outermostScope and currentScope of the iterator
- are set to "startEntry". If "startEntry" = NULL, the outermostScope and
- currentScope are set to the root entry. The currentPosition for the iterator is
- set to "nil".
- If propertyName != Null, propertyName, propertyValue, and propertySize are used
- to filter the entries returned during an iteration. If propertyName == Null, all
- entries are returned.
- */
- extern OSStatus RegCreateEntryIterator(RegTransaction transaction, const RegEntryRef *startEntry, RegEntryIteratorOptions options, const char *propertyName, const void *propertyValue, ByteCount propertySize, RegEntryIterator *iterator);
-
- /* Dispose Entry Iterator*/
- extern OSStatus RegDisposeEntryIterator(RegEntryIterator iterator);
-
- /*
- Enter Child Entry
- Move an Entry Iterator into the scope of a specified child entry. The
- currentScope of the iterator is set to the entry specified in "childEntry". If
- "childEntry" is nil, the currentScope is set to the entry specified by the
- currentPosition of the iterator.
- Note RegEnterEntry cannot be used if the "kRegIterateEmbeddedEntries" option was
- set when the iterator was created.
- */
- extern OSStatus RegEnterEntry(RegTransaction transaction, RegEntryIterator iterator, RegEntryRef *childEntry);
-
- /*
- Exit to Parent Entry
- Move an Entry Iterator out of the current entry back into the scope of it's parent
- entry. The currentPosition of the iterator is reset to the current entry (the
- previous currentScope), so the next iteration call will continue where it left off.
- This position is returned in parameter "currentPosition".
- Note RegExitEntry cannot be used if the "kRegIterateEmbeddedEntries" option was
- set when the iterator was created.
- */
- extern OSStatus RegExitEntry(RegTransaction transaction, RegEntryIterator iterator, RegEntryRef *currentPosition);
-
- /*
- Iterate Entries
- Iterate and return entries contained within the entry defined by the current
- scope of the iterator. If kRegIterateEmbeddedEntries option was specified when the
- iterator was created, all embedded entries will be included in the iteration. If a
- property selection (name , value, and size) was specified when the iterator was
- created, the only entries having a matching property are returned. Entries are
- returned one at a time. When OSStatus == nrIterationDone, all entries have been exhausted, and the
- value of nextEntry will be Nil. If changed == true, one or more changes (entry
- create or delete) occured since the last interation call.
- */
- extern OSStatus RegIterateEntries(RegTransaction transaction, RegEntryIterator iterator, RegEntryRef *nextEntry, Boolean *changed);
-
- /*
- Restart Entry Iteration
- Restart an iteration within the current scope. The iterator is reset such that
- iteration of the contents of the currentScope entry can be restarted. The
- outermostScope and currentScope of the iterator are unchanged. The currentPosition
- for the iterator is set to "nil".
- */
- extern OSStatus RegRestartEntryIteration(RegEntryIterator iterator);
-
- /*
- ------------------------------------------------------------------------------------
- Adding and Deleting Properties
- ------------------------------------------------------------------------------------
- */
- /*
- Create Property
- A single instance property is created by default. To create a multiple-instance
- property set the kRegMultiInstanceProperty option. The next instance of the
- property will be created and the instance value will be returned in
- propertyInstance.
- */
- extern OSStatus RegCreateProperty(RegTransaction transaction, const RegEntryRef *entryRef, const char *propertyName, const void *propertyValue, ByteCount propertySize, RegCreatePropertyOptions options, RegPropertyInstance *propertyInstance);
-
- /*
- Delete Property
- To delete a property the desired property instance(s) must be explicitly
- identified. To delete a single instance property set propertyInstance to
- kRegNilPropertyInstance. To delete all instances of a multi-instance property, set
- propertyInstance to kRegAllPropertyInstances. Otherwise, propertyInstance must
- be set to a valid instance value.
- */
- extern OSStatus RegDeleteProperty(RegTransaction transaction, const RegEntryRef *EntryRef, const char *propertyName, RegPropertyInstance propertyInstance);
-
- /*
- ------------------------------------------------------------------------------------
- Get/Set Property Values
- ------------------------------------------------------------------------------------
- */
- /*
- Get/Set the value of the specified property for the specified entry. To get, get
- size, and set property values the desired property instance must be explicitly
- identified. For single instance properites propertyInstance must be set to
- kRegNilPropertyInstance. Otherwise, propertyInstance must be set to a valid
- instance value.
- Get Property size
- */
- extern OSStatus RegGetPropertySize(RegTransaction transaction, const RegEntryRef *entryRef, const char *propertyName, RegPropertyInstance propertyInstance, ByteCount *propertySize);
-
- /* Get Property*/
- extern OSStatus RegGetProperty(RegTransaction transaction, const RegEntryRef *entryRef, const char *propertyName, RegPropertyInstance propertyInstance, void *propertyValue, ByteCount *propertySize);
-
- /* Set Property*/
- extern OSStatus RegSetProperty(RegTransaction transaction, const RegEntryRef *entryRef, const char *propertyName, RegPropertyInstance propertyInstance, const void *propertyValue, ByteCount propertySize);
-
- /*
- ------------------------------------------------------------------------------------
- Iterating Properties
- ------------------------------------------------------------------------------------
- */
- /*
- Create Property Iterator
- Create the property iterator structure. The target entry is defined by entryRef.
- If a propertyName is specified, only property instances having the specified name
- are returned. If propertyName == nil, all properties are returned.
- */
- extern OSStatus RegCreatePropertyIterator(RegTransaction transaction, const RegEntryRef *entryRef, const char *propertyName, RegPropertyIterator *iterator);
-
- /* Dispose Property Iterator*/
- extern OSStatus RegDisposePropertyIterator(RegPropertyIterator iterator);
-
- /*
- Iterate Properites
- Iterate and return properties for given entry. If a propertyName was specified
- when the iterator was created, then only property instances for that name are
- returned. Otherwise, all properties are returned. The return value in
- propertyInstance will be kRegNilPropertyInstance if the property is single
- instance. Else it will contain the instance value for the property. If
- changed == true, one or more changes (property creates or deletes) occured since the
- last iterate call. When OSStatus == nrIterationDone, all properties have been exhausted.
- */
- extern OSStatus RegIterateProperties(RegTransaction transaction, RegPropertyIterator iterator, char *foundProperty, RegPropertyInstance *propertyInstance, Boolean *changed);
-
- /*
- Restart Property Iteration
- Used to re-iterate over a list of properties. The Property Iterator is reset to
- the beginning of the list of properties for an entry.
- */
- extern OSStatus RegRestartPropertyIteration(RegPropertyIterator iterator);
-
- /*
- ------------------------------------------------------------------------------------
- Transaction-control calls
- ------------------------------------------------------------------------------------
- */
- /*
- Begin Transaction
- Marks the beginning of a sequence of Name Registry calls that compose a Registry
- transaction. An internal data structure for the transaction is created and a
- reference to the transaction is returned in "tranasaction". This reference must be
- used with all subsequence Name Registry calls pertaining to the transaction. The
- transaction reference must be disposed using a RegCommitTransaction or
- RegAbortTranscation call.
- */
- extern OSStatus RegBeginTransaction(RegTransaction *transaction);
-
- /*
- Commit Transaction
- Commits the changes made to the registry for a sepecified transaction. All changes
- (entry create/delete, property create/delete, and property value update) made for
- the transaction are atomically integrated into the Registry. If result ==
- nrTransactionAborted, there was a conflict with changes from some other transaction,
- and this transaction was aborted, i.e., no changes for this transaction were made.
- In this case the transaction should be repeated.
- Note that RegCommitTransaction always disposes the transcation reference
- independant of the outcome of the transaction. So to repeat a transaaction you
- must start over with a RegBeginTransaction call.
- */
- extern OSStatus RegCommitTransaction(RegTransaction transaction);
-
- /*
- Abort Transaction
- Aborts the changes made to the registry for a sepecified transaction. All changes
- (entry create/delete, property create/delete, and property value update) made for
- the transaction are disgarded.
- RegAbortTransaction also disposes of the transcation reference.
- */
- extern OSStatus RegAbortTransaction(RegTransaction transaction);
-
- #endif
- #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
- /*
- ------------------------------------------------------------------------------------
- Name Registry Interface for PowerSurge 1.0.2
- ------------------------------------------------------------------------------------
- */
- /*
- * Name Registry - API for device driver name registration
- *
- * This interface provides access to the namespace used
- * by device drivers. The data structures and entry points
- * are specialized and simplified for device driver use.
- */
- /*
- //////////////////////////////////////////////////////////////////////////////
- //
- // Data Structures
- //
- */
- /*
- //////////////////////////////////////////////////////////////////////////////
- //
- // Foundation Types
- //
- */
- /* Value of a property */
- typedef void *RegPropertyValue;
- /* Length of property value */
- typedef UInt32 RegPropertyValueSize;
- /*
- //////////////////////////////////////////////////////////////////////////////
- //
- // RegEntryID : The Global x-Namespace Entry Identifier
- //
- */
- /* RegEntryID: The Global Entry ID*/
- typedef RegEntryRef RegEntryID;
- typedef RegEntryID *RegEntryIDPtr;
- /*
- //////////////////////////////////////////////////////////////////////////////
- //
- // Root Entry Name Definitions (Applies to all Names in the RootNameSpace)
- //
- // * Names are a colon-separated list of name components. Name components
- // may not themselves contain colons.
- // * Names are presented as null-terminated ASCII character strings.
- // * Names follow similar parsing rules to Apple file system absolute
- // and relative paths. However the '::' parent directory syntax is
- // not currently supported.
- */
- /* Max length of Entry Name */
-
- enum {
- kRegCStrMaxEntryNameLength = 47
- };
-
- /* Entry Names are single byte ASCII */
- typedef char RegCStrEntryName;
- typedef char *RegCStrEntryNamePtr;
- /* length of RegCStrEntryNameBuf = kRegCStrMaxEntryNameLength+1*/
- typedef char RegCStrEntryNameBuf[48];
- typedef char RegCStrPathName;
- typedef UInt32 RegPathNameSize;
-
- enum {
- kRegEntryNameTerminator = 0x00, /* '\0' */
- kRegPathNameTerminator = 0x00 /* '\0' */
- };
-
- /*
- //////////////////////////////////////////////////////////////////////////////
- //
- // Property Name and ID Definitions
- // (Applies to all Properties Regardless of NameSpace)
- */
-
- enum {
- kRegMaximumPropertyNameLength = 31, /* Max length of Property Name */
- kRegPropertyNameTerminator = 0x00 /* '\0' */
- };
-
- typedef char RegPropertyName;
- typedef char *RegPropertyNamePtr;
- /*
- //////////////////////////////////////////////////////////////////////////////
- //
- // Iteration Operations
- //
- // These specify direction when traversing the name relationships
- */
- typedef UInt32 RegIterationOp;
- typedef RegIterationOp RegEntryIterationOp;
-
- enum {
- /* Absolute locations*/
- kRegIterRoot = 0x00000002, /* "Upward" Relationships */
- kRegIterParents = 0x00000003, /* include all parent(s) of entry */
- /* "Downward" Relationships*/
- kRegIterChildren = 0x00000004, /* include all children */
- kRegIterSubTrees = 0x00000005, /* include all sub trees of entry */
- kRegIterDescendants = 0x00000005, /* include all descendants of entry */
- /* "Horizontal" Relationships */
- kRegIterSibling = 0x00000006, /* include all siblings */
- /* Keep doing the same thing*/
- kRegIterContinue = 0x00000001
- };
-
- /*
- //////////////////////////////////////////////////////////////////////////////
- //
- // Name Entry and Property Modifiers
- //
-
- //
- // Modifiers describe special characteristics of names
- // and properties. Modifiers might be supported for
- // some names and not others.
- //
- // Device Drivers should not rely on functionality
- // specified as a modifier.
- */
- typedef UInt32 RegModifiers;
- typedef RegModifiers RegEntryModifiers;
- typedef RegModifiers RegPropertyModifiers;
-
- enum {
- kRegNoModifiers = 0x00000000, /* no entry modifiers in place */
- kRegUniversalModifierMask = 0x0000FFFF, /* mods to all entries */
- kRegNameSpaceModifierMask = 0x00FF0000, /* mods to all entries within namespace */
- kRegModifierMask = 0xFF000000 /* mods to just this entry */
- };
-
- /* Universal Property Modifiers */
-
- enum {
- kRegPropertyValueIsSavedToNVRAM = 0x00000020, /* property is non-volatile (saved in NVRAM) */
- kRegPropertyValueIsSavedToDisk = 0x00000040 /* property is non-volatile (saved on disk) */
- };
-
- /*
- ///////////////////////
- //
- // The Registry API
- //
- ///////////////////////
- */
- /*
- ///////////////////////
- //
- // Entry Management
- //
- ///////////////////////
- */
- /*
- -------------------------------
- * EntryID handling
- */
- /*
- * Initialize an EntryID to a known invalid state
- * note: invalid != uninitialized
- */
- extern OSStatus RegistryEntryIDInit(RegEntryID *id);
-
- /*
- * Compare EntryID's for equality or if invalid
- *
- * If a NULL value is given for either id1 or id2, the other id
- * is compared with an invalid ID. If both are NULL, the id's
- * are consided equal (result = true).
- */
- extern Boolean RegistryEntryIDCompare(const RegEntryID *id1, const RegEntryID *id2);
-
- /*
- * Copy an EntryID
- */
- extern OSStatus RegistryEntryIDCopy(const RegEntryID *src, RegEntryID *dst);
-
- /*
- * Free an ID so it can be reused.
- */
- extern OSStatus RegistryEntryIDDispose(RegEntryID *id);
-
- /*
- -------------------------------
- * Adding and removing entries
- *
- * If (parentEntry) is NULL, the name is assumed
- * to be a rooted path. It is rooted to an anonymous, unnamed root.
- */
- extern OSStatus RegistryCStrEntryCreate(const RegEntryID *parentEntry, const RegCStrPathName *name, RegEntryID *newEntry);
-
- extern OSStatus RegistryEntryDelete(const RegEntryID *id);
-
- /*
- ---------------------------
- * Traversing the namespace
- *
- * To support arbitrary namespace implementations in the future,
- * I have hidden the form that the place pointer takes. The previous
- * interface exposed the place pointer by specifying it as a
- * RegEntryID.
- *
- * I have also removed any notion of returning the entries
- * in a particular order, because an implementation might
- * return the names in semi-random order. Many name service
- * implementations will store the names in a hashed lookup
- * table.
- *
- * Writing code to traverse some set of names consists of
- * a call to begin the iteration, the iteration loop, and
- * a call to end the iteration. The begin call initializes
- * the iteration cookie data structure. The call to end the
- * iteration should be called even in the case of error so
- * that allocated data structures can be freed.
- *
- * Create(...)
- * do {
- * Iterate(...);
- * } while (!done);
- * Dispose(...);
- *
- * This is the basic code structure for callers of the iteration
- * interface.
- */
- typedef struct OpaqueRegEntryIter* RegEntryIter;
- /*
- * create/dispose the iterator structure
- * defaults to root with relationship = kRegIterDescendants
- */
- extern OSStatus RegistryEntryIterateCreate(RegEntryIter *cookie);
-
- extern OSStatus RegistryEntryIterateDispose(RegEntryIter *cookie);
-
- /*
- * set Entry Iterator to specified entry
- */
- extern OSStatus RegistryEntryIterateSet(RegEntryIter *cookie, const RegEntryID *startEntryID);
-
- /*
- * Return each value of the iteration
- *
- * return entries related to the current entry
- * with the specified relationship
- */
- extern OSStatus RegistryEntryIterate(RegEntryIter *cookie, RegEntryIterationOp relationship, RegEntryID *foundEntry, Boolean *done);
-
- /*
- * return entries with the specified property
- *
- * A NULL RegPropertyValue pointer will return an
- * entry with the property containing any value.
- */
- extern OSStatus RegistryEntrySearch(RegEntryIter *cookie, RegEntryIterationOp relationship, RegEntryID *foundEntry, Boolean *done, const RegPropertyName *propertyName, const void *propertyValue, RegPropertyValueSize propertySize);
-
- /*
- --------------------------------
- * Find a name in the namespace
- *
- * This is the fast lookup mechanism.
- * NOTE: A reverse lookup mechanism
- * has not been provided because
- * some name services may not
- * provide a fast, general reverse
- * lookup.
- */
- extern OSStatus RegistryCStrEntryLookup(const RegEntryID *searchPointID, const RegCStrPathName *pathName, RegEntryID *foundEntry);
-
- /*
- ---------------------------------------------
- * Convert an entry to a rooted name string
- *
- * A utility routine to turn an Entry ID
- * back into a name string.
- */
- extern OSStatus RegistryEntryToPathSize(const RegEntryID *entryID, RegPathNameSize *pathSize);
-
- extern OSStatus RegistryCStrEntryToPath(const RegEntryID *entryID, RegCStrPathName *pathName, RegPathNameSize pathSize);
-
- /*
- * Parse a path name.
- *
- * Retrieve the last component of the path, and
- * return a spec for the parent.
- */
- extern OSStatus RegistryCStrEntryToName(const RegEntryID *entryID, RegEntryID *parentEntry, RegCStrEntryName *nameComponent, Boolean *done);
-
- /*
- //////////////////////////////////////////////////////
- //
- // Property Management
- //
- //////////////////////////////////////////////////////
- */
- /*
- -------------------------------
- * Adding and removing properties
- */
- extern OSStatus RegistryPropertyCreate(const RegEntryID *entryID, const RegPropertyName *propertyName, const void *propertyValue, RegPropertyValueSize propertySize);
-
- extern OSStatus RegistryPropertyDelete(const RegEntryID *entryID, const RegPropertyName *propertyName);
-
- /*
- ---------------------------
- * Traversing the Properties of a name
- *
- */
- typedef struct OpaqueRegPropertyIter* RegPropertyIter;
- extern OSStatus RegistryPropertyIterateCreate(const RegEntryID *entry, RegPropertyIter *cookie);
-
- extern OSStatus RegistryPropertyIterateDispose(RegPropertyIter *cookie);
-
- extern OSStatus RegistryPropertyIterate(RegPropertyIter *cookie, RegPropertyName *foundProperty, Boolean *done);
-
- /*
- * Get the value of the specified property for the specified entry.
- *
- */
- extern OSStatus RegistryPropertyGetSize(const RegEntryID *entryID, const RegPropertyName *propertyName, RegPropertyValueSize *propertySize);
-
- /*
- * (*propertySize) is the maximum size of the value returned in the buffer
- * pointed to by (propertyValue). Upon return, (*propertySize) is the size of the
- * value returned.
- */
- extern OSStatus RegistryPropertyGet(const RegEntryID *entryID, const RegPropertyName *propertyName, void *propertyValue, RegPropertyValueSize *propertySize);
-
- extern OSStatus RegistryPropertySet(const RegEntryID *entryID, const RegPropertyName *propertyName, const void *propertyValue, RegPropertyValueSize propertySize);
-
- /*
- //////////////////////////////////////////////////////
- //
- // Modibute (err, I mean Modifier) Management
- //
- //////////////////////////////////////////////////////
- */
- /*
- * Modifiers describe special characteristics of names
- * and properties. Modifiers might be supported for
- * some names and not others.
- *
- * Device Drivers should not rely on functionality
- * specified as a modifier. These interfaces
- * are for use in writing Experts.
- */
- /*
- * Get and Set operators for entry modifiers
- */
- extern OSStatus RegistryEntryGetMod(const RegEntryID *entry, RegEntryModifiers *modifiers);
-
- extern OSStatus RegistryEntrySetMod(const RegEntryID *entry, RegEntryModifiers modifiers);
-
- /*
- * Get and Set operators for property modifiers
- */
- extern OSStatus RegistryPropertyGetMod(const RegEntryID *entry, const RegPropertyName *name, RegPropertyModifiers *modifiers);
-
- extern OSStatus RegistryPropertySetMod(const RegEntryID *entry, const RegPropertyName *name, RegPropertyModifiers modifiers);
-
- /*
- * Iterator operator for entry modifier search
- */
- extern OSStatus RegistryEntryMod(RegEntryIter *cookie, RegEntryIterationOp relationship, RegEntryID *foundEntry, Boolean *done, RegEntryModifiers matchingModifiers);
-
- /*
- * Iterator operator for entries with matching
- * property modifiers
- */
- extern OSStatus RegistryEntryPropertyMod(RegEntryIter *cookie, RegEntryIterationOp relationship, RegEntryID *foundEntry, Boolean *done, RegPropertyModifiers matchingModifiers);
-
- #endif
-
- #pragma options align=reset
- #endif /* PRAGMA_ALIGN_SUPPORTED */
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __NAMEREGISTRY__ */
-
-